<?php

namespace App\Admin\Controllers;

use App\Admin\Metrics\Examples;
use App\Http\Controllers\Controller;
use Dcat\Admin\Http\Controllers\Dashboard;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;
use Dcat\Admin\Admin;

class HomeController extends Controller
{
    public function index(Content $content)
    {
        // return $content
        //     ->body(function (Row $row) {
        //         $row->column(2, function (Column $column) {
        //             $column->row(admin_view('quantity_of_device'));
        //             //$column->row(admin_view('world'));
        //             //$column->row(new Examples\Amount());
        //             //$column->row(admin_view('holle'));
        //             //$column->row(admin_view('time'));
                    
        //         });
        //         $row->column(2, function (Column $column) {
        //             //$column->row(admin_view('holle'));
        //             //$column->row(new Examples\Amount());
        //             //$column->row(new Examples\Amount());
        //             //$column->row(new Examples\Sales());
        //             // $column->row(new Examples\Profit()); 
        //         });
        //         $row->column(2, function (Column $column) {
        //             //$column->row(admin_view('holle'));
        //             //$column->row(new Examples\Amount());
        //             //$column->row(new Examples\Amount());
        //             //$column->row(new Examples\Sales());
        //             //$column->row(new Examples\Profit()); 
        //         });
        //         $row->column(2, function (Column $column) {
        //             //$column->row(admin_view('holle'));
        //             //$column->row(new Examples\Amount());
        //             //$column->row(new Examples\Amount());
        //             //$column->row(new Examples\Sales());
        //             //$column->row(new Examples\Profit());
                    
        //         });
            
             
        //     });
  
        $content->row(function(Row $row) {
            $row->column(2, admin_view('number_of_users'));
            $row->column(2, admin_view('quantity_of_device'));
            $row->column(2, admin_view('Number_of_parts'));
            
        });
        $content->row(function(Row $row) {
            $row->column(12, admin_view('parts_list'));
            $row->column(12, admin_view('device_list'));
            
        });
        $content->row(function(Row $row) {
            $row->column(4, admin_view('device_state'));
            $row->column(4, admin_view('part_state'));
        });
        
        $content->row('<br>');
        return $content;
    }
}
